using UnityEngine;
using QFramework;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

namespace ProjectChildhood
{
	public partial class GameOverController : ViewController
	{
        public Button btn_launch;

        void Start()
		{
            btn_launch.onClick.AddListener(() =>
            {
                LaunchGame();
            });
        }

        private void Update()
        {
            if (Input.GetKeyUp(KeyCode.Space))
            {
                LaunchGame();
                Global.ResetData();
            }
        }

        private void LaunchGame()
        {
            SceneManager.LoadScene("GameLauncher");
        }
    }
}
